package com.ruoyi.system.config;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AreaEnum {

    AREA_ALL(1, "总图"),
    AREA_ROAD(10026, "道路"),
    AREA_STREET(10027, "一层"),
    AREA_VILLAGE(10028, "二层"),
    AREA_TOWN(10029, "三层"),
    AREA_CITY(10030, "四层");

    private final int id;
    private final String name;

    public static String getAreaName(int id) {
        for (AreaEnum areaEnum : values()) {
            if (areaEnum.getId() == id) {
                return areaEnum.getName();
            }
        }

        return null;
    }

}
